package com.hualala.supplychain.methodext.utils;

import com.alibaba.fastjson.JSONObject;
import org.slf4j.MDC;

public class ResultUtils {
    public static JSONObject getSuccess(){
        JSONObject result = new JSONObject();
        result.put("traceID", MDC.get("traceID"));
        result.put("success", true);
        result.put("code", "000");
        result.put("msg", "执行成功");
        return result;
    }
    public static JSONObject getFail(String code,String msg){
        JSONObject result = new JSONObject();
        result.put("traceID", MDC.get("traceID"));
        result.put("success", false);
        result.put("code", code);
        result.put("msg", msg);
        return result;
    }
}
